﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace CPPEI.Coolzon.BrowserApp.MainViewControl
{
    /// <summary>
    /// MessageView.xaml 的交互逻辑
    /// </summary>
    public partial class MessageView : UI.View
    {
        public MessageView()
        {
            InitializeComponent();
        }

        public MessageView(string Message)
        {
            InitializeComponent();
            this.lblMsg.Content = Message;
        }

        private void Grid_Loaded(object sender, RoutedEventArgs e)
        {
            this.btnOK.Click += btnOK_Click;
            this.btnCancel.Click += btnCancel_Click;
        }

        /// <summary>
        /// 取消
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            Cancel();
        }

        /// <summary>
        /// 确定
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        void btnOK_Click(object sender, RoutedEventArgs e)
        {
            Submit();
        }
    }
}
